Some personal computers, word processors, mobile telephones comprise a display section capable of displaying color. As a technique for displaying characters with a high resolution in such apparatuses, for example, Japanese Laid-Open Publication No. 2001-100725 discloses a character display apparatus.
This character display apparatus is provided with a plurality of pixels on a display surface thereof Each pixel comprises a plurality of sub-pixels arranged in a predetermined direction, to which respective colors (e.g., Red (R), Green (G), and Blue (B)) are assigned. The strength of a color element in a sub-pixel is represented by the level of the color element which has a plurality of steps, e.g., 0 to 7. If a certain level of color element is assigned to a sub-pixel corresponding to the skeleton of a character, color element levels which vary stepwise around the sub-pixel are assigned to surrounding sub-pixels. The color element levels are arranged in a predetermined pattern. Each color element level is converted to a luminance level in accordance with predetermined correspondence.
The level of a color element corresponds to the degree of the color element which contributes to the color of a character. The greater the contribution of a sub-pixel to the color of a character, the greater the color element level of the sub-pixel. The greater the contribution of a sub-pixel to the color of a background, the lower the color element level of the sub-pixel. The luminance level of a sub-pixel corresponds to the degree of light emission of the sub-pixel. The greater the luminance level of a sub-pixel, the greater the degree of light emission of the sub-pixel. The lower the luminance level, the lower the degree of light emission. Thus, by controlling the color element level on a sub-pixel-by-sub-pixel basis so as to display the shapes of characters, the characters can be displayed with a higher resolution than when the luminance level is controlled on a pixel-by-pixel basis. Further, by forming a pattern of color element levels which vary stepwise around a sub-pixel corresponding to the skeleton of a character, color noise can be suppressed.
Japanese Laid-Open Publication No. 2001-184051 discloses another character display apparatus capable of displaying characters with a high resolution. In this character display apparatus, a predetermined correspondence between the above-described color element level and luminance level is appropriately changed according to the color of a character to be displayed and the color of a background. As a result, characters can be displayed with a high resolution in any character color and any background color.
FIG. 12 is a block diagram showing a representative configuration of a character display apparatus 1a as disclosed in Japanese Laid-Open Publication Nos. 2001-100725 and 2001-184051 described above.
Examples of the character display apparatus 1a include any information display apparatuses comprising a display device capable of displaying color, such as electronic apparatuses, information apparatuses, and the like, specifically personal computers and word processors of any type, such as desktop, laptop, and the like. Examples of the character display apparatus 1a also include electronic apparatuses comprising a color liquid crystal display device, such as communication apparatuses (e.g., personal digital assistants, mobile telephones including PHS, general fixed telephones, FAX, etc.).
The character display apparatus 1a comprises a display device 3. The display device 3 is capable of displaying color. Examples of the display device 3 include liquid crystal displays, organic EL displays, and the like.
The display device 3 is connected to a control section 20. The control section 20 comprises a CPU 2 and a main memory 4. The control section 20 separately controls a plurality of color elements corresponding to a plurality of sub-pixels included in the display device 3. The control section 20 is connected to an input device 7 and an auxiliary memory apparatus 40.
The input device 7 is an apparatus for inputting characters to be displayed on the display device 3, instructions of the user, and the like. Examples of the input device 7 include keyboards, touch panels, mice, and the like.
The auxiliary memory apparatus 40 stores a display program 41a for displaying characters, and data 5 including character shape data 5b, a correction table 5c and a luminance table 5d. Examples of the character shape data 5b include outline data representing the contour shapes of characters, skeleton data representing the skeletal shapes of characters, bitmap data representing characters, and the like. Note that processing by the display program 41a slightly varies depending on the type of the character shape data 5b. Characters to be displayed may include simple graphics, such as pictographic characters and the like. In the descriptions below, characters are illustrated.
The correction table 5c is used to determine the color element levels of sub-pixels neighboring a sub-pixel corresponding to a basic portion. For example, when the color element level of a sub-pixel corresponding to a basic portion is 7, the color element levels of its neighboring sub-pixels are set to be, for example, 5, 2 and 1 from the nearest to the basic portion. The luminance table 5d defines a correspondence between color element levels and luminance levels.
FIGS. 13A and 13B are diagrams for explaining a display surface of the display device 3. The display surface of the display device 3 is provided with a plurality of pixels 10 for displaying characters, graphics, and the like as shown in FIG. 13A. Each pixel 10 comprises 3 sub-pixels 11 arranged in a predetermined direction (a horizontal direction in FIG. 13A), to which respective color elements (e.g., Red (R), Green (G), and Blue (B)) are assigned.
When a character is displayed on the display surface, the basic portion representing the skeleton of the character is assigned to sub-pixels 11 in pixels 10 associated with the character according to the character shape data 5b. For example, when a Kanji character “” is displayed, the basic portion corresponding to the skeleton of the character is assigned to sub-pixels 11 indicated by hatched portions shown in FIG. 9.
A process for associating the basic portion representing the skeleton of a character with sub-pixels 11 varies depending on the type of the character shape data 5b. For example, outline data contains a character code for identifying the type of a character, the number of strokes constituting a single character (the stroke count of a character), the number of contour points constituting a single stroke, the coordinates of contour points constituting a single stroke, and the like. In this case, each stroke has a shape enclosed by a contour line approximated by curved lines, straight lines, arcs, a combination thereof, or the like, and a predetermined thickness so as to display the contour shape of a character. A contour line representing the contour shape of a character can be approximated by straight lines, curved lines, arcs, a combination thereof, or the like, using the coordinate data of contour points. If an area where the inside of a contour line overlaps a sub-pixel is greater than or equal to a predetermined area, such a sub-pixel is determined to correspond to a basic portion representing the skeleton of a character.
Skeleton data contains a character code for identifying the type of a character, the number of strokes constituting a single character, the number of points constituting a single stroke, the line type of a stroke (curved line, straight line, or the like), the coordinates of points constituting a single stroke, and the like. In this case, each stroke is in the form of a line of a certain line type for representing the skeletal shape of a character, and does not have a thickness. If the line type of a stroke is a straight line, the stroke can be approximated by a straight line passing through a plurality of points constituting the stroke using the coordinate data. If the line type of a stroke is a curved line, the stroke can be approximated by a curved line passing through a plurality of points constituting the stroke using the coordinate data. Sub-pixels 11 on a stroke are determined as sub-pixels 12 (FIG. 13) corresponding to the basic portion representing the skeleton of a character.
When a sub-pixel 12 corresponding to the basic portion representing the skeleton of a character is determined, the color element levels of the sub-pixel 12 and a sub-pixel 13 neighboring the sub-pixel 12 are determined. For example, when a sub-pixel 12 (hatched in FIG. 13B), which is located at the middle of three sub-pixels 11 (FIG. 1 3A) constituting a pixel 10, is determined to correspond to a basic portion, the color element level of the sub-pixel 12 corresponding to the basic portion is set to be “7” which is the maximum level. The color element levels of sub-pixels 13 which neighbor the sub-pixel 12 corresponding to the basic portion and are determined not to correspond to the basic portion, are set according to the correction table 5C whose example is shown in FIG. 10. For example, when a correction pattern 1 is selected, the color element levels of the sub-pixels 13 which neighbor the sub-pixel 12 corresponding to the basic portion, are set to be stepwise decreased, e.g., “5”, “2”, and “1” with an increase in the distance from the sub-pixel 12 corresponding to the basic portion. Alternatively, when a correction pattern 2 is selected, the color element levels of the sub-pixels 13 which neighbor the sub-pixel 12 corresponding to the basic portion, are set to be stepwise decreased, e.g., “4”, “2”, and “1” with an increase in the distance from the sub-pixel 12 corresponding to the basic portion. The color element level of sub-pixels 14, which are located at a distance of four pixels from the sub-pixel 12 corresponding to the basic portion, is set to be “0” which is intended to represent a background.
Note that when a sub-pixel 13, which does not correspond to a basic portion, neighbors a plurality of sub-pixels 12 corresponding to a basic portion, the color element level of the sub-pixel 13 can take a plurality of values depending on the distance from the sub-pixels 12. In this case, the color element level of the sub-pixel 13 is set to be the greatest value.
The color element level of each sub-pixel is converted to a luminance level according to a correspondence between color element levels and luminance levels defined in the luminance table 5d whose example is shown in FIG. 11. In FIG. 13B, the luminance level of the sub-pixel 12 corresponding to the basic portion is set to be “0”. The luminance level of a sub-pixel having a color element level of “5”, which neighbors the sub-pixel 12, is set to be “73”. The luminance level of a sub-pixel having a color element level of “2” is set to be “182”. The luminance level of a sub-pixel having a color element level of “1” is set to be “219”. The luminance level of the sub-pixel 14, whose color element level is set to “0” as a background, is set to be “255”.
FIG. 14 is a flowchart indicating a process flow of the display program 41a (FIG. 12) when the character shape data 5b is skeleton data.
In step S1, a character code and a character size are input through the input device 7. For example, when a Kanji character “” is displayed on the display device 3, 4458 (JIS KUTEN code, 44th section and 58th point) is input as a character code. The character size is represented by the number of dots in a horizontal direction and the number of dots in a vertical direction, e.g., 20 dots×20 dots, for example.
In step S2, skeleton data corresponding to the input character code is read from the character shape data 5b in the auxiliary memory apparatus 40 and is then stored in the main memory 4 of the control apparatus 20. This skeleton data contains a character code for identifying the type of a character, the number of strokes constituting a single character, the number of points constituting a single stroke, the line type of a stroke, the coordinates of points constituting a single stroke, and the like.
In step S3, the coordinate data of points constituting each stroke is scaled according to the character size input through the input device 7. This scaling converts the coordinate data in the skeleton data defined in a predetermined coordinate system to a real pixel coordinate system for the display device 3. In this case, the scaling is performed by considering the arrangement of sub-pixels. As shown in FIG. 13A, for example, one pixel 10 comprises three sub-pixels 11 arranged in an X direction. When a character size is 20 dots×20 dots, the coordinate data of the skeleton data is scaled into data of 60(=20×3) pixels×20 pixels.
In step S4, the coordinate data of points constituting a stroke is obtained. In step S5, it is determined whether the type of stroke is a straight line or a curved line from the line type of the stroke contained in the skeleton data. When the type of stroke is a straight line, the process goes to step S6. When the type of stroke is a curved line, but not a straight line, the process goes to step S7.
In step S6, the points constituting the stroke are linked with straight lines, and sub-pixels on the straight lines are defined as the basic portion representing the skeleton of a character. In step S7, the coordinate data of the points constituting the stroke is approximated by curved lines, and sub-pixels positioned on the curved lines are defined as the basic portion representing the skeleton of a character.
In step S8, the color element level of the sub-pixel corresponding to the basic portion representing the skeleton of the character, which is defined in step S6 or step S7, is set to be “7” which is the maximum color element level. Next, in step S9, the color element levels of sub-pixels neighboring the sub-pixel corresponding to the basic portion are set according to the correction table 5c. 
In step S10, it is determined whether or not all strokes contained in a character have been processed. If “Yes”, the process goes to step S11. If “No”, the process returns to step S3 and is continued. In step S11, the color element levels of the sub-pixels are converted to respective luminance levels according to the luminance table 5d indicating the correspondence between color element levels and luminance levels. In step S12, luminance data indicating the luminance levels of the sub-pixels determined in step S11 is transferred to the display device 3.
In this manner, luminance levels are adjusted on a sub-pixel-by-sub-pixel basis to display a character on the display device 3. In this case, sub-pixels corresponding to the basic portion representing the skeleton of a character are obtained from the skeleton data. Alternatively, such sub-pixels may be obtained from outline data, bitmap data, or the like by a predetermined process. Alternatively, the pattern of the basic portion may be previously stored as character shape data in the auxiliary memory apparatus 40 and may be read as required.
In the above-described conventional technique, a pattern of the color element levels of sub-pixels constituting a character is determined, and thereafter, the color element levels are converted to respective luminance levels which are actually displayed on a display section. Therefore, the process is complicated and a working memory area required for the process is increased. As a result, character display processing is slowed, the hardware cost is increased, and the like.
In the above-described conventional technique, when two or more strokes having a predetermined width are near to or cross each other, the space portion within a character is reduced so that the shape of the character is hardly recognized, i.e., “deformed character”. To avoid this, a pattern of the color element levels of sub-pixels is changed. However, it is a complicated task to change a pattern of color element levels by actually recognizing the positional relationship between strokes.
When colors can be arbitrarily assigned to characters and backgrounds to be displayed, some combination of the color of a character and the color of a background may not be suitable for a pattern of color element levels, resulting in a degradation in the shape of a character and a significant reduction in the visibility of the character.